#ifndef __TWN_TCPH
#define __TWN_TCPH	1

#ifdef ALONE_TWN_TCPLAN
#include <stdio.h>
#include <iostream>
#include "ApmsApi.h"
#include "Tianwan.h"
#include "Uti_Tianwan.h"
#include "Mov_Tianwan.h"
#include "Twn_Mov_xy.h"
#include "Twn_Exec_mov.h"
#include "Twn_Path_Fill.h"
#include "Twn_Pro_ph.h"
#define API_TCP extern "C" __declspec(dllexport)
#else
#define API_TCP extern "C" __declspec(dllimport)
#endif

#define		TCP_ERR_CODE(ErrCode)	ErrCode + 5000

API_TCP BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved);
API_TCP	int TCP_LogFileWrite(TCHAR cmd[4], TCHAR *Comment, int errNum);
API_TCP	int TCP_ActivateLog(void);
API_TCP	int TCP_DeactivateLog(void);
API_TCP	int TCP_ActivateMsgBox(void);
API_TCP	int TCP_DeactivateMsgBox(void);
API_TCP	int TCP_SetLogPath(char *path);
API_TCP RETSTAT CheckOpCondition(t_tc_op opStruct, int *opToJump, int *errNum);
API_TCP PHASTAT TCPExeOp(t_tc_op opToExecute, int numOp, GENIDX tecCycIdx);
API_TCP PHASTAT	TCPlanner(HWND hWnd);
API_TCP PHASTAT DCIPlanner(int *numCellChecked);
API_TCP PHASTAT DMPPlanner(int *numCellChecked);
API_TCP PHASTAT DMPPlannerSingle(void);
API_TCP PHASTAT InsideReact(float x, float y, bool *inside);
#endif